<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <title>商品详情</title>
    <link href="__INDEX__/css/mui.min.css" rel="stylesheet"/>
    <link rel="stylesheet" href="__INDEX__/css/iconfont.css" />
    <link rel="stylesheet" href="__INDEX__/css/style.css" />
    <link rel="stylesheet" href="__INDEX__/css/yund.css" />
</head>
<body>

	<header class="mui-bar mui-bar-nav show_bar_nav">
		<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left" href="JavaScript:history.go(-1)"></a>
		<h1 class="mui-title"><a href="#sp" class="active goodsshow1">商品</a><a href="#xq" class="goodsshow2">详情</a><a href="#pj">评价</a></h1>
	</header>

	
	<div class="mui-content" id="sp">
		<div class="xqy_cpimg" ><img src="{$goods_info.thumb|default='__INDEX__/bg.png'}"></div>
		<div class="xqy_top" >
			<div class="spxq_nambox clearfix">
				<div class="spxq_nam" id="goods_name">{$goods_info['name']}</div>
			</div>
			<div class="xqy_pribox">
				<span class="xqy_pri" id="current_price">¥{$goods_info['money']|default='0.00'}</span>
			</div>
			<ul class="xqy_klist clearfix">
				
				<li>销量：{$goods_info['sales']|default='0'}</li>
			</ul>
		</div>
		<div class="xqy_pjbox" id="pj">
			<p class="xqy_pjicon"><span class="iconfont icon-icon_order"></span>评价</p>
			<div class="xqy_pjnr">
				<p class="xqy_pjbt">宝贝评价</p>
				<ul class="xqy_pjlist">
					
				</ul>
				<div class="xqy_pjbtn evaluation">
					<a href="">查看全部评价</a>
				</div>
			</div>
		</div>
		<div class="xqy_conbox" id="xq">
			<p class="xqy_pjicon"><span class="iconfont icon-tupian"></span>商品详情</p>
			<div class="xqy_spxq" id="summary">
				{$goods_info['content']|html_entity_decode}
			</div>
		</div>
	</div>
	<nav class="mui-bar mui-bar-tab spxq_bar_tab"  id="footer-list">
		<a class="mui-tab-item" href="{:url('index/index/index')}" >
			<span class="mui-icon iconfont icon-shangcheng"></span>
			<span class="mui-tab-label" >首页</span>
		</a>
		<a class="mui-tab-item" id="go_shop2" href="">
			<span class="mui-icon iconfont icon-gouwuche1"></span>
			<span class="mui-tab-label" >购物车</span>
		</a>
		<a class="mui-tab-item">
			<span class="mui-icon iconfont icon-xingxing"></span>
			<span class="mui-tab-label">收藏</span>
		</a>
		<a class="mui-tab-item add_cart" id='add_cart'  onclick="add_cart()">加入购物车</a>
		<a class="mui-tab-item add_lijgm" href="">立即购买</a>
	</nav>
</body>
</html>
{include file="public/footer" /}
<script>
	function add_cart(){
		layer.confirm('您确定加入购物车吗？', {
			btn: ['确定', '取消'] //按钮
		}, function() {
			$.ajax({
				type:"post",
				url: "{:url('index/cart/add_cart')}",
				data: {goods_id :"{$goods_info['id']}"},//表单数据
				success: function(data) {
					layer.msg(data.msg);
				}
			})
		})
	}
</script>